package com.franklin.java.api.classloader;

import com.franklin.plugins.common.collection.PrettyHashSet;

import java.util.Set;

/**
 * 过滤某些类
 * @author Franklin
 * @since 2021/9/25 12:31
 */
class ClassFilter {

    private static Set<String> ignorePackages;

    static {
        ignorePackages = new PrettyHashSet<>();
        ignorePackages.add("com.mysql.jdbc.integration");
    }

    static boolean filter(String className){
        for (String ignorePackage : ignorePackages) {
            if (className.startsWith(ignorePackage)){
                return false;
            }
        }
        return true;
    }
}
